public class CBot
{
	private CSequence seg_Bot;
	private int int_IndexPointer;
	private String str_Name;
	
	public CBot(String str_Name)
	{
		this.str_Name = str_Name;
		int_IndexPointer = 0;
		seg_Bot = new CSequence();
	}
	
	public void setSequence(CCard[] cards_In)
	{
		if(seg_Bot.soc_SetOfCards==CSequence.enum_SetOfCards.SOC_NULL){seg_Bot = new CSequence(cards_In);}
		else
		{
			for(int i=0; i<cards_In.length; ++i){seg_Bot.cards_SetOfCards[i+int_IndexPointer]=cards_In[i];}
		}
		seg_Bot = seg_Bot.getSequenceOfCards();
	}
	
	public CSequence getSequence(){return seg_Bot;}
	
	public int changeCards()
	{
		switch(seg_Bot.soc_SetOfCards)
		{
			case SOC_HIGH_CARD:
				for(int i=0;i<5;++i){seg_Bot.cards_SetOfCards[i]=new CCard();}
				CQuick.quicksort(seg_Bot.cards_SetOfCards, 0, 4);
				int_IndexPointer = 0;
				return 5;
			
			case SOC_HIGH_CARD_NEAR_STRAIGHT:
				seg_Bot.cards_SetOfCards[0]=new CCard();
				CQuick.quicksort(seg_Bot.cards_SetOfCards, 0, 4);
				int_IndexPointer = 4;
				return 1;
			
			case SOC_HIGH_CARD_NEAR_STRAIGHT_FLUSH:
				seg_Bot.cards_SetOfCards[0]=new CCard();
				CQuick.quicksort(seg_Bot.cards_SetOfCards, 0, 4);
				int_IndexPointer = 4;
				return 1;
				
			case SOC_ONE_PAIR:
				for(int i=2;i<5;++i){seg_Bot.cards_SetOfCards[i]=new CCard();}
				CQuick.quicksort(seg_Bot.cards_SetOfCards, 0, 4);
				int_IndexPointer = 2;
				return 3;
				
			case SOC_TWO_PAIR:
				seg_Bot.cards_SetOfCards[4]=new CCard();
				CQuick.quicksort(seg_Bot.cards_SetOfCards, 0, 4);
				int_IndexPointer = 4;
				return 1;
				
			case SOC_THREE_OF_A_KIND:
				for(int i=3;i<5;++i){seg_Bot.cards_SetOfCards[i]=new CCard();}
				CQuick.quicksort(seg_Bot.cards_SetOfCards, 0, 4);
				int_IndexPointer = 3;
				return 2;
		}
		int_IndexPointer = 5;
		return 0;
	}
	
	public String getName()
	{
		return str_Name;
	}
	
}
